Optimal. Leaf size=88 \[ \frac{\left (a^2+b^2\right ) (a+b \tan (c+d x))^{n+1}}{b^3 d (n+1)}-\frac{2 a (a+b \tan (c+d x))^{n+2}}{b^3 d (n+2)}+\frac{(a+b \tan (c+d x))^{n+3}}{b^3 d (n+3)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0764361, antiderivative size = 88, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {3506, 697} \[ \frac{\left (a^2+b^2\right ) (a+b \tan (c+d x))^{n+1}}{b^3 d (n+1)}-\frac{2 a (a+b \tan (c+d x))^{n+2}}{b^3 d (n+2)}+\frac{(a+b \tan (c+d x))^{n+3}}{b^3 d (n+3)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3506
Rule 697
Rubi steps
\begin{align*} \int \sec ^4(c+d x) (a+b \tan (c+d x))^n \, dx &=\frac{\operatorname{Subst}\left (\int (a+x)^n \left (1+\frac{x^2}{b^2}\right ) \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac{\operatorname{Subst}\left (\int \left (\frac{\left (a^2+b^2\right ) (a+x)^n}{b^2}-\frac{2 a (a+x)^{1+n}}{b^2}+\frac{(a+x)^{2+n}}{b^2}\right ) \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac{\left (a^2+b^2\right ) (a+b \tan (c+d x))^{1+n}}{b^3 d (1+n)}-\frac{2 a (a+b \tan (c+d x))^{2+n}}{b^3 d (2+n)}+\frac{(a+b \tan (c+d x))^{3+n}}{b^3 d (3+n)}\\ \end{align*}
Mathematica [A] time = 0.240196, size = 71, normalized size = 0.81 \[ \frac{(a+b \tan (c+d x))^{n+1} \left (\frac{a^2+b^2}{n+1}+\frac{(a+b \tan (c+d x))^2}{n+3}-\frac{2 a (a+b \tan (c+d x))}{n+2}\right )}{b^3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.197, size = 0, normalized size = 0. \begin{align*} \int \left ( \sec \left ( dx+c \right ) \right ) ^{4} \left ( a+b\tan \left ( dx+c \right ) \right ) ^{n}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.77677, size = 392, normalized size = 4.45 \begin{align*} \frac{{\left (2 \,{\left (2 \, a b^{2} n + a^{3} + 3 \, a b^{2}\right )} \cos \left (d x + c\right )^{3} +{\left (a b^{2} n^{2} + a b^{2} n\right )} \cos \left (d x + c\right ) +{\left (b^{3} n^{2} + 3 \, b^{3} n + 2 \, b^{3} + 2 \,{\left (2 \, b^{3} -{\left (a^{2} b - b^{3}\right )} n\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )\right )} \left (\frac{a \cos \left (d x + c\right ) + b \sin \left (d x + c\right )}{\cos \left (d x + c\right )}\right )^{n}}{{\left (b^{3} d n^{3} + 6 \, b^{3} d n^{2} + 11 \, b^{3} d n + 6 \, b^{3} d\right )} \cos \left (d x + c\right )^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: NotImplementedError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]